﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ModelLayer
{
    public class Sale
    {
        private int saleID;
        private decimal totalPrice;
        private Show show;
        private Person person;
        private bool payed;
        private DateTime paymentDate;
        private int seatsReserved;

        public Sale(decimal totalPrice, Show show, Person person, bool payed, DateTime paymentDate, int seatsReserved)
        {
            this.totalPrice = totalPrice;
            this.show = show;
            this.person = person;
            this.payed = payed;
            this.paymentDate = paymentDate;
            this.seatsReserved = seatsReserved;

        }

        public int SaleID
        {
            get { return saleID; }
            set { saleID = value; }
        }

        public decimal TotalPrice
        {
            get { return totalPrice; }
            set { totalPrice = value; }
        }

        public Show Show
        {
            get { return show; }
            set { show = value; }
        }

        public Person Person
        {
            get { return person; }
            set { person = value; }
        }

        public bool Payed
        {
            get { return payed; }
            set { payed = value; }
        }

        public DateTime PaymentDate
        {
            get { return paymentDate; }
            set { paymentDate = value; }
        }

        public int SeatsReserved
        {
            get { return seatsReserved; }
            set { seatsReserved = value; }
        }

        // override object.Equals
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }

            // TODO: write your implementation of Equals() here
            Sale s = (Sale) obj;
            return
                this.saleID.Equals(s.saleID);

        }
    }

    
}
